
#include "registry.h"

#include "registry_storage.h"
#include "registry_loader.h"

void registry::load(const std::string& filename)
{
	registry_loader::load(*instance_, filename);
}

std::auto_ptr<registry_storage> registry::instance_(new registry_storage);

const std::string& registry::value_for(const std::string& key)
{
	const std::string* value = instance_->get(key);

	if(value == 0x0)
		throw registry_error("property not available.");

	return *value;
}
